package com.hk.housekeeping.utils;

public enum ResponseCode {
    //员工表的状态码
    STAFF_ADD_ERROR(400, "员工添加操作错误！"),
    STAFF_DEL_ERROR(401, "员工删除操作错误！"),
    STAFF_SELECT_ERROR(402, "员工信息返回错误！"),
    STAFF_EDIT_ERROR(403, "员工信息编译操作错误！"),
    STAFF_PAGE_ERROR(404, "分页查询失败！"),
    STAFF_SEARCH_ERROR(405, "联合查询失败！"),
    STAFF_SEARCH_BY_NAME_ERROR(406, "员工名字查找失败！"),
    STAFF_SEARCH_BY_PHONE_ERROR(406, "通过手机查找失败！"),

    //用户管理表的状态码
    USER_ADD_ERROR(601,"用户添加失败"),
    USER_DEL_ERROR(602,"用户删除失败"),
    USER_MOD_ERROR(603,"用户修改失败"),
    USER_SEL_ERROR(604,"用户查询失败"),
    USER_PAG_ERROR(605,"用户分页失败"),
    USER_EDIT_ERROR(605,"用户信息操作失败"),

    //广告管理表的状态码
    ADVERTISE_ADD_ERROR(40001,"广告添加错误"),
    ADVERTISE_DEL_ERROR(40002,"广告删除失败"),
    ADVERTISE_LIST_ERROR(40003,"广告查询失败"),
    ADVERTISE_UPDATE_ERROR(40004,"广告修改失败"),
    ADVERTISE_PAGE_ERROR(40005,"分页查询失败"),
    ADVERTISE_BY_NAME_ERROR(40006,"广告名称查询失败"),
    ADVERTISE_BY_STATUS_ERROR(40006,"通过状态值查询失败"),

    //管理者表的状态码
    MANAGER_LOGIN_ERROR(501, "登录失败，请检查用户名或密码是否正确！"),
    MANAGER_EMPTY_ERROR(502, "登录用户名和密码不可为空！"),
    MANAGER_DELETE_ERROR(503, "管理员删除失败！"),
    MANAGER_INSERT_ERROR(504, "管理员添加失败！"),
    MANAGER_PERMISSION_ERROR(506, "管理员权限授予失败！"),
    MANAGER_EDIT_ERROR(505, "管理员信息修改失败！"),
    MANAGER_PAGE_SELECT_ERROR(506, "管理员分页显示失败！"),

    //服务项目表的状态码
    ITEM_PAGE_SELECT_ERROR(701, "服务项目查询失败！"),
    ITEM_DELETE_ERROR(702, "服务项目删除失败！"),
    ITEM_SEARCH_BY_NAME_ERROR(703, "服务项目查找失败！"),
    ITEM_SEARCH_BY_TIME_ERROR(704, "服务项目查找失败！"),
    ITEM_ADD_ERROR(705, "服务项目增加失败！"),

    //服务项目详情表的状态码
    ITEM_DETAIL_SELECT_ERROR(801, "服务项目详情查询失败！"),
    ITEM_DETAIL_UPDATE_ERROR(802, "服务项目详情修改失败！"),

    ;
    private int status;
    private String msg;

    ResponseCode() {
    }

    ResponseCode(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }
}
